#!/bin/bash
echo "*********************************************"
echo "start setting /etc/security/limits.d/90-nproc.conf"
sed -i '/hard/d' /etc/security/limits.d/90-nproc.conf
sed -i '/soft/d' /etc/security/limits.d/90-nproc.conf
sed -i '$a\*    soft    nofile  65536' /etc/security/limits.d/90-nproc.conf
sed -i '$a\*    hard    nofile  65536' /etc/security/limits.d/90-nproc.conf
sed -i '$a\*    soft    nproc   131072' /etc/security/limits.d/90-nproc.conf
sed -i '$a\*    hard    nproc   131072' /etc/security/limits.d/90-nproc.conf
cat /etc/security/limits.d/90-nproc.conf
echo "finished setting 90-nproc.conf"
echo "******************************************"
echo deadline > /sys/block/sbd/queue/scheduler
